#!/bin/bash
kill -9 $(ps -ef|grep /data/code/go/publisher/publisher|grep -v grep|awk '{print $2}')
cd /data/code/go/publisher
git pull
rm -f /data/code/go/publisher/publisher
cd /data/code/go/publisher/app
go build -o publisher  main.go
cp ./publisher /data/code/go/publisher
rm -f /data/code/go/publisher/app/publisher
nohup /data/code/go/publisher/publisher &